package com.jacobson.huobi.mvp.contract

import com.alibaba.fastjson.JSONObject
import com.jacobson.core.mvp.IModel
import com.jacobson.core.mvp.IPresenter
import com.jacobson.core.mvp.IView
import com.jacobson.huobi.entities.VipRechargeCostInfo
import com.jacobson.huobi.entities.evt.VipRechargeSubmitEvt
import com.jacobson.huobi.entities.response.CommonResponse
import com.jacobson.huobi.entities.response.VipRechargeResponse
import io.reactivex.Observable
import okhttp3.MultipartBody

interface VipContract {
    interface Model : IModel {
        fun loadRechargeSupportList(
            vipLevel: Int
        ): Observable<VipRechargeResponse>

        fun loadRechargeCost(
            rechargeSupportId: Int
        ): Observable<CommonResponse<VipRechargeCostInfo>>

        fun vipUpload(file: MultipartBody.Part, width: Int = 150): Observable<CommonResponse<JSONObject>>

        fun rechargeSubmit(rechargeSubmitEvt: VipRechargeSubmitEvt): Observable<CommonResponse<JSONObject>>
    }

    interface View : IView {
        fun onRechargeSupportResp(response: VipRechargeResponse)

        fun onRechargeCostResp(response: CommonResponse<VipRechargeCostInfo>)

        fun onVipUploadResp(response: CommonResponse<JSONObject>)

        fun onRechargeSubmitResp(response: CommonResponse<JSONObject>)
    }

    interface Presenter : IPresenter {

        fun loadRechargeSupportList(
            vipLevel: Int
        )

        fun loadRechargeCost(
            rechargeSupportId: Int
        )

        fun vipUpload(file: MultipartBody.Part, width: Int = 150)

        fun rechargeSubmit(rechargeSubmitEvt: VipRechargeSubmitEvt)
    }
}